class CreateBls < ActiveRecord::Migration
  def change
    create_table :bls do |t|
      t.string :bl_no
      t.integer :status
      t.string :voyage
      t.string :route
      t.string :course
      t.string :confirm_code
      t.boolean :can_query
      t.string :shipper_name
      t.references :user
      t.references :cy
      t.references :forward
      t.references :motorcade
      t.references :shipowner
      t.references :port
      t.timestamps
    end
    add_index :bls, :user_id
    add_index :bls, :cy_id
    add_index :bls, :forward_id
    add_index :bls, :motorcade_id
    add_index :bls, :shipowner_id
    add_index :bls, :port_id
  end
end
